package servlet;

import dao.EmpInfoDAO;
import org.example.bean.EmpInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;
import java.util.List;

@Controller
@RequestMapping("/empServlet")
public class EmpServlet {
    @Autowired
    private EmpInfoDAO eidao;
    @RequestMapping("/a")
    public String a(HttpSession session){
        List<EmpInfo> list = eidao.findAllEmp();
        session.setAttribute("ALL_EMP_LIST",list);
        return "xiha";
    }
}
